package com.blockmeta.bbs.immodule.corebean;

import android.content.Context;
import androidx.annotation.NonNull;

import com.blockmeta.bbs.baselibrary.net.callback.BaseResponseCallBack;
import com.blockmeta.bbs.immodule.bean.beaninterface.ICircleEntry;
import com.blockmeta.bbs.immodule.dao.CircleMember;
import com.blockmeta.bbs.immodule.dao.IMUserEntity;
import com.blockmeta.bbs.immodule.net.pojo.CircleDetailResponse;
import com.blockmeta.bbs.immodule.net.pojo.CircleMemberResponse;
import com.blockmeta.bbs.immodule.net.pojo.Notice;

import java.util.List;

import rx.functions.Action1;

public interface ICircleDomainService {
    void getGroup(long groupId, BaseResponseCallBack<String, IMUserEntity> callBack);

    @NonNull
    IMUserEntity saveImUserEntityByCircleResponse(CircleDetailResponse circleDetailResponse);

    void deleteCircle(long mCircleId);

    void joinCircle(Context context, long circleId, int circleAuthRule, int userLevel, CircleJoinCallBack circleJoinCallBack);

    void addCircle(long group_id, BaseResponseCallBack callBack);

    List<IMUserEntity> getGroupListFriends(long uid);

    void updateCircleMemberCount(long toUserId, int size);

    void updateCircleInfo(int id, long uidInt, String name, String desc);

    String getJoinBtnStr(ICircleEntry item);

    /**
     * 添加或更新圈子成员信息到数据库
     * @param circleMemberResponses
     */
    void addCircleMember(List<CircleMemberResponse> circleMemberResponses);

    CircleMember getCircleMember(long userId, long chatGroupId);

    IMUserEntity getUser(long mCircleId);

    List<IMUserEntity> getGroupListMyGroupFirst(long uidInt);

    String getCircleRemarkName(long mCircleId);

    void updateMyCircleRemarkName(long mCircleId, String remarkName);

    String getCircleRemarkName(IMUserEntity iMUserEntity, long chatGroupId);

    String getCircleRemarkName(long userId, long groupId, String name, String remarkName);

    void setNoDisturb(long mCircleId, boolean checked);

    Notice getNoticeInMem(long toUserId);

    void putNoticeInMem(Notice result, long circleId);

    void getCircleMemberResponse(Context mContext, long mCircleId, boolean needUpdateMem, Action1 listAction1);

    String getTagConvert(String content, long chatGroupId);

    interface CircleJoinCallBack{
        void onSuccess(String message);
        void onFail();
    }

    boolean isCircleDisturb(long chatGroupId);
}
